1. Field of the Invention
The present invention relates to an echo prevention circuit, a filter coefficient setting method, and a recording medium with program recorded.
2. Description of the Related Art
Recently, for example, in some communication devices such as mobile phones and hands-free phones connected to earphone microphones, echo prevention circuits are incorporated to prevent echo from occurring due to acoustic coupling from speaker to microphone, electric reflection on circuits, etc. For example, Japanese Patent Publication No. 3293029 discloses a circuit preventing echo by canceling an input signal with the use of a signal having the antiphase of and the same amplitude level as the input signal. However, although in the configuration disclosed in Japanese Patent Publication No. 3293029, a circuit constant of each circuit element must be set highly accurately to cancel the echo highly accurately, such setting is not easy and the echo cannot be cancelled highly accurately.
Therefore, a method is considered for canceling echo highly accurately with the use of digital processing. FIG. 15 depicts an example of an echo prevention circuit using a DSP 200. As shown in FIG. 15, an AD converter 201 receives input of an analogue signal representing voices transmitted from the other party using a mobile phone, etc. The signal is converted to digital by the AD converter 201 and output after a convolution process is performed by FIR filters 202, 203 in the DSP 200 based on each filter coefficients. The signal output from the FIR filter 202 is input to a DA converter 204. The signal is converted to analog by the DA converter 204, is amplified by an amplification circuit 205 and output to an earphone microphone through an input/output terminal 206, and is input to one terminal of a differential amplification circuit 207. The signal output from the FIR filter 203 is input to a DA converter 208. The signal output from the DA converter 208 is amplified by an amplification circuit 209 and input to the other terminal of the differential amplification circuit 207.
The signal output from the differential amplification circuit 207 is amplified by an amplification circuit 210, converted into a digital signal by an AD converter 211, and input to the DSP 200. This digital signal is output from the DSP 200, converted to an analog signal by a DA converter 212, and output as the output signal of the echo prevention circuit.
The DSP 200 acquires an impulse response of the DA converter 204 through the AD converter 211 from the output of the AD converter 211 when outputting an impulse to the DA converter 204. The DSP 200 also acquires an impulse response of the DA converter 208 through the AD converter 211 from the output of the AD converter 211 when outputting an impulse to the DA converter 208. The echo can be cancelled by appropriately setting the filter coefficients of the FIR filters 202, 203 based on these impulse responses.
By the way, although an earphone microphone can convert voices generated in the ear due to vocalization into an analog signal to be output, this signal is very weak. Therefore, in the echo prevention circuit shown in FIG. 15, the weak signal input from the earphone microphone is amplified by the differential amplification circuit 207 and the amplification circuit 210 by about 50 dB, for example.
In such an echo prevention circuit, the differential amplification circuit 207 and the amplification circuit 210 also amplify the impulse generated when acquiring the impulse responses used for setting the filter coefficients of the FIR filters 202, 203. Therefore, by generating a small impulse as shown in FIG. 16A, suitably sized impulse responses can be acquired as shown in FIG. 16B. However, since a small impulse as shown in FIG. 16A is vulnerable to circuit noises, background noises input from the earphone microphone, etc., accurate impulse responses cannot be acquired. On the other hand, if the impulse is increased to reduce vulnerability to circuit noises and background noises as shown in FIG. 17A, the impulse responses will overflow in the AD converter 211 as shown in FIG. 17B.
Therefore, in the echo prevention circuit shown in FIG. 15, since the accuracy of the acquirable impulse responses is low and the filter coefficients cannot be set appropriately for the FIR filters 202, 203, it is difficult to cancel the echo effectively.